package biolabs.core

/**
 * Interface for actions performed on a single bio-object.
 *
 * @tparam T type of the target bio-object.
 * @tparam P type of partial result (for progress notifications). May be Unit.
 * @tparam R type of the final action result. May be Unit.
 *
 * @author Tomas Mikula
 */
trait UnaryAction[T, P, R] extends Action[T, P, R] {

	/**
	 * Performs the action on the target bio-object.
	 * @param target bio-object on which the action is performed.
	 * @param notifyProgress callback for progress notifications.
	 * @return the result of the action.
	 */
	def perform(target: T, notifyProgress: P=>Unit): R

}